#!/usr/bin/env bash

jobDone() {
  echo Training finished.
  echo The next will start...
  sleep 2
  clear
}

if [ ! -d "./saved" ]; then
  mkdir saved
fi

if [ ! -d "./logs" ]; then
  mkdir logs
fi

for batch_size in 32 64
do
  patience=10
#  python train.py -s saved/model_f_v_b${batch_size}_p${patience}.pkl -b ${batch_size} -p ${patience} -n log_f_v_b${batch_size}_p${patience} > logs/log_f_v_b${batch_size}_p${patience}.txt
#  jobDone
  python train.py -a -s saved/model_f_a_b${batch_size}_p${patience}.pkl -b ${batch_size} -p ${patience} -n log_f_a_b${batch_size}_p${patience} > logs/log_f_a_b${batch_size}_p${patience}.txt
  jobDone
  for ((i=1; i<2; i++))
  do
#    python train.py -l saved/model_f_v_b${batch_size}_p${patience}.pkl -s saved/model_f_v_b${batch_size}_p${patience}.pkl -b ${batch_size} -p ${patience} -n log_f_v_b${batch_size}_p${patience}_2 >> logs/log_f_v_b${batch_size}_p${patience}.txt
#    jobDone
    python train.py -a -l saved/model_f_a_b${batch_size}_p${patience}.pkl -s saved/model_f_a_b${batch_size}_p${patience}.pkl -b ${batch_size} -p ${patience} -n log_f_a_b${batch_size}_p${patience}_2 >> logs/log_f_a_b${batch_size}_p${patience}.txt
    jobDone
  done
done

echo All finished.